home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 123
/
(Vol 123) Jan 13 2011.iso
/
Games
/
plumber_2.swf
/
scripts
/
frame_57
/
DoAction.as
Wrap
Text File
|
2011-01-13
|
4KB
|
254 lines
pipedir = eval("pipe" + pipen).pipe.dir;
pipetype = holder[pipen];
error = 1;
if(flow == 1)
{
if(pipetype == 1)
{
if(pipedir == 3)
{
correct++;
flow = 2;
error = 0;
thatsright();
x++;
}
else if(pipedir == 4)
{
correct++;
flow = 4;
error = 0;
thatsright();
x--;
}
}
if(pipetype == 2)
{
if(pipedir == 2 || pipedir == 4)
{
correct++;
flow = 1;
error = 0;
thatsright();
y--;
}
}
if(pipetype == 3)
{
if(pipedir == 1 || pipedir == 3)
{
correct++;
flow = 2;
error = 0;
thatsright();
x++;
}
else if(pipedir == 2 || pipedir == 4)
{
correct++;
flow = 4;
error = 0;
thatsright();
x--;
}
}
if(pipetype == 4)
{
correct++;
flow = 1;
error = 0;
thatsright();
y--;
}
}
else if(flow == 2)
{
if(pipetype == 1)
{
if(pipedir == 1)
{
correct++;
flow = 1;
error = 0;
thatsright();
y--;
}
else if(pipedir == 4)
{
correct++;
flow = 3;
error = 0;
thatsright();
y++;
}
}
if(pipetype == 2)
{
if(pipedir == 1 || pipedir == 3)
{
correct++;
flow = 2;
error = 0;
thatsright();
x++;
}
}
if(pipetype == 3)
{
if(pipedir == 1 || pipedir == 3)
{
correct++;
flow = 1;
error = 0;
thatsright();
y--;
}
else if(pipedir == 2 || pipedir == 4)
{
correct++;
flow = 3;
error = 0;
thatsright();
y++;
}
}
if(pipetype == 4)
{
correct++;
flow = 2;
error = 0;
thatsright();
x++;
}
}
else if(flow == 3)
{
if(pipetype == 1)
{
if(pipedir == 1)
{
correct++;
flow = 4;
error = 0;
thatsright();
x--;
}
else if(pipedir == 2)
{
correct++;
flow = 2;
error = 0;
thatsright();
x++;
}
}
if(pipetype == 2)
{
if(pipedir == 2 || pipedir == 4)
{
correct++;
flow = 3;
error = 0;
thatsright();
y++;
}
}
if(pipetype == 3)
{
if(pipedir == 1 || pipedir == 3)
{
correct++;
flow = 4;
error = 0;
thatsright();
x--;
}
else if(pipedir == 2 || pipedir == 4)
{
correct++;
flow = 2;
error = 0;
thatsright();
x++;
}
}
if(pipetype == 4)
{
correct++;
flow = 3;
error = 0;
thatsright();
y++;
}
}
else if(flow == 4)
{
if(pipetype == 1)
{
if(pipedir == 2)
{
correct++;
flow = 1;
error = 0;
thatsright();
y--;
}
else if(pipedir == 3)
{
correct++;
flow = 3;
error = 0;
thatsright();
y++;
}
}
if(pipetype == 2)
{
if(pipedir == 1 || pipedir == 3)
{
correct++;
flow = 4;
error = 0;
thatsright();
x--;
}
}
if(pipetype == 3)
{
if(pipedir == 1 || pipedir == 3)
{
correct++;
flow = 3;
error = 0;
thatsright();
y++;
}
else if(pipedir == 2 || pipedir == 4)
{
correct++;
flow = 1;
error = 0;
thatsright();
y--;
}
}
if(pipetype == 4)
{
correct++;
flow = 4;
error = 0;
thatsright();
x--;
}
}
if(pipetype == 5)
{
error = 0;
gotoAndStop("yay");
play();
}
if(error > 0)
{
gotoAndPlay(66);
}